home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / GameboyDev / GBDK / lib / time.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-03-29  |  304 b   |  22 lines

  1. /*
  2.   time.c
  3.  
  4.   Simple, not completly conformant implementation of time routines
  5. */
  6.  
  7. /* clock() is in clock.s */
  8. #include <time.h>
  9.  
  10. time_t time(time_t *t)
  11. {
  12.     UWORD ret;
  13.  
  14.     /* Should be relative to 0:00 1970 GMT but hey */
  15.     ret = clock() / CLOCKS_PER_SEC;
  16.  
  17.     if (t)
  18.     *t = ret;
  19.  
  20.     return ret;
  21. }
  22.